package com.generic.demo1;

/**
 * @ClassName Test
 * @Description TODO
 * @Author Kx
 * @Date 2025/3/25 19:06
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Pet pet = new Cat("小花","暴躁");

        People<Pet> people = new People<>("小明",pet);

        people.shopping();


        System.out.println("************************");

        Pet pet1 = new Dog("小黑","温顺");
        People<Pet> people1 = new People<>("小红", pet1);
        people1.shopping();

        System.out.println("************************");

        Pet pet2 = new Tortoise("小黄","开朗");
        People<Pet> people2 = new People<>("小刚", pet2);
        people2.shopping();
    }
}
